-- =========================================================================================
-- 				PROTECT THE VIP - Gamemode by SteveUK
--  You are free to make modifications and redistributions of this gamemode as long as I'm credited for it
--=========================================================================================

-- includes
include( "shared.lua" ) -- includes shared, as well as the team stuff
include( "gamerules.lua" ) -- gamerules
include( "player.lua" )

-- client side lua files
AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "player.lua" )
AddCSLuaFile( "weapons.lua" )

-- called when we start up, we need to precache all of the models
function GM:Initialize( )
	GAMEMODE:PrecacheModels()
end

-- the map additions system, when added will be called after all the level entities have been spawned
function GM:InitPostEntity( )	
	-- TO DO
end

-- this needs to be changed so that VIP protectors get penalised for killing VIPs
function GM:DoPlayerDeath( pl, attacker, dmginfo )
	
	pl:CreateRagdoll()
	pl:AddDeaths( 1 )
	
	GAMEMODE:ScorePlayer( pl, attacker ) -- sort out scores
	GAMEMODE:GamerulesThink() -- check for stuff

end

-- weapons to give and stuff.
function GM:PlayerLoadout( pl )

end
